package com.qf.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.qf.mapper.DtsAdminMapper;
import com.qf.pojo.DtsAdmin;
import com.qf.vo.CatVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class AdminServiceImpl implements AdminService{
    @Autowired
    private DtsAdminMapper adminMapper;
    @Override
    public List<DtsAdmin> findAdminByUserName(String userName) {
        QueryWrapper queryWrapper = new QueryWrapper();
        queryWrapper.eq("username",userName);
        queryWrapper.eq("deleted",false);
        List list = adminMapper.selectList(queryWrapper);
        return list;
    }

    @Override
    public List<CatVo> queryAdmin() {
        List<CatVo> catVos = adminMapper.queryAdmin();
        return catVos;
    }
}
